#include <stdio.h>
#include <stdlib.h>
#include <arpa/inet.h>

int main() {
    char *addr = "127.232.124.79";
    struct sockaddr_in addr_inet;
    int ret = inet_aton(addr, &addr_inet.sin_addr);
    if (ret == 0) {
        printf("conversion error\n");
    } else {
        printf("%#x\n", addr_inet.sin_addr.s_addr);
    }
}